package com.wushi.bigdata.udf;

import org.apache.flink.table.functions.ScalarFunction;

/**
 * @ClassName SubStringFunc
 * @Deacription 自定义scalar函数需要是public，并名为eval，参数需要为serializable
 * @Author wushumin
 * @Date 2021-10-20 14:02
 * @Version 1.0
 **/
public class SubStringFunc extends ScalarFunction {
    public SubStringFunc() {
    }

    public String eval(String s, Integer begin, Integer end){
        return s.substring(begin,end);
    }
}
